package com.javashow.main.menu.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.javashow.main.menu.service.IMainMenuService;

@Controller
public class MainMenuController {
	
	@Autowired
	private IMainMenuService mainMenuService;
	
	@RequestMapping("/test")
	public @ResponseBody String test() {
		String msg = "hello world!!";
		return msg;
	}
	
	@RequestMapping("/mainmenu")
	public @ResponseBody String getMainMenu() {
		String result = null;
		result = mainMenuService.queryMainMenu().toString();
//System.out.println(result);
		return result;
	}
}
